# Import necessary libraries for data analysis and visualization
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
# Load the dataset
df=pd.read_csv('Shark Tank India Dataset.csv')
# Display the first few rows of the dataset
df.head()
| episode_number | pitch_number | brand_name | idea | deal | pitcher_ask_amount | ask_equity | ask_valuation | deal_amount | deal_equity | ... | ashneer_deal | anupam_deal | aman_deal | namita_deal | vineeta_deal | peyush_deal | ghazal_deal | total_sharks_invested | amount_per_shark | equity_per_shark | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | BluePine Industries | Frozen Momos | 1 | 50.0 | 5.0 | 1000.00 | 75.0 | 16.00 | ... | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 | 25.0 | 5.333333 |
| 1 | 1 | 2 | Booz scooters | Renting e-bike for mobility in private spaces | 1 | 40.0 | 15.0 | 266.67 | 40.0 | 50.00 | ... | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 20.0 | 25.000000 |
| 2 | 1 | 3 | Heart up my Sleeves | Detachable Sleeves | 1 | 25.0 | 10.0 | 250.00 | 25.0 | 30.00 | ... | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 | 12.5 | 15.000000 |
| 3 | 2 | 4 | Tagz Foods | Healthy Potato Chips | 1 | 70.0 | 1.0 | 7000.00 | 70.0 | 2.75 | ... | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 70.0 | 2.750000 |
| 4 | 2 | 5 | Head and Heart | Brain Development Course | 0 | 50.0 | 5.0 | 1000.00 | 0.0 | 0.00 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0 | 0.000000 |
5 rows × 28 columns
# Get information about the dataset
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 117 entries, 0 to 116 Data columns (total 28 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 episode_number 117 non-null int64 1 pitch_number 117 non-null int64 2 brand_name 117 non-null object 3 idea 117 non-null object 4 deal 117 non-null int64 5 pitcher_ask_amount 117 non-null float64 6 ask_equity 117 non-null float64 7 ask_valuation 117 non-null float64 8 deal_amount 117 non-null float64 9 deal_equity 117 non-null float64 10 deal_valuation 117 non-null float64 11 ashneer_present 117 non-null int64 12 anupam_present 117 non-null int64 13 aman_present 117 non-null int64 14 namita_present 117 non-null int64 15 vineeta_present 117 non-null int64 16 peyush_present 117 non-null int64 17 ghazal_present 117 non-null int64 18 ashneer_deal 117 non-null int64 19 anupam_deal 117 non-null int64 20 aman_deal 117 non-null int64 21 namita_deal 117 non-null int64 22 vineeta_deal 117 non-null int64 23 peyush_deal 117 non-null int64 24 ghazal_deal 117 non-null int64 25 total_sharks_invested 117 non-null int64 26 amount_per_shark 117 non-null float64 27 equity_per_shark 117 non-null float64 dtypes: float64(8), int64(18), object(2) memory usage: 25.7+ KB
# Get the shape of the dataset
df.shape
(117, 28)
# Display the last few rows of the dataset
df.tail()
| episode_number | pitch_number | brand_name | idea | deal | pitcher_ask_amount | ask_equity | ask_valuation | deal_amount | deal_equity | ... | ashneer_deal | anupam_deal | aman_deal | namita_deal | vineeta_deal | peyush_deal | ghazal_deal | total_sharks_invested | amount_per_shark | equity_per_shark | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 112 | 34 | 113 | Green Protein | Plant-Based Protein | 0 | 60.0 | 2.0 | 3000.0 | 0.0 | 0.0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0 | 0.0 |
| 113 | 34 | 114 | On2Cook | Fastest Cooking Device | 0 | 100.0 | 1.0 | 10000.0 | 0.0 | 0.0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0 | 0.0 |
| 114 | 35 | 115 | Jain Shikanji | Lemonade | 1 | 40.0 | 8.0 | 500.0 | 40.0 | 30.0 | ... | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 4 | 10.0 | 7.5 |
| 115 | 35 | 116 | Woloo | Washroom Finder | 0 | 50.0 | 4.0 | 1250.0 | 0.0 | 0.0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0 | 0.0 |
| 116 | 35 | 117 | Elcare India | Carenting for Elders | 0 | 100.0 | 2.5 | 4000.0 | 0.0 | 0.0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0 | 0.0 |
5 rows × 28 columns
# Generate descriptive statistics of the dataset
df.describe()
| episode_number | pitch_number | deal | pitcher_ask_amount | ask_equity | ask_valuation | deal_amount | deal_equity | deal_valuation | ashneer_present | ... | ashneer_deal | anupam_deal | aman_deal | namita_deal | vineeta_deal | peyush_deal | ghazal_deal | total_sharks_invested | amount_per_shark | equity_per_shark | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | ... | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 | 117.000000 |
| mean | 18.735043 | 59.000000 | 0.555556 | 319.854709 | 5.188034 | 3852.462479 | 31.982915 | 8.963504 | 467.104872 | 0.837607 | ... | 0.179487 | 0.205128 | 0.239316 | 0.188034 | 0.128205 | 0.230769 | 0.059829 | 1.230769 | 18.132481 | 5.583590 |
| std | 10.070778 | 33.919021 | 0.499041 | 2767.842777 | 3.892121 | 11931.601957 | 36.687391 | 13.106769 | 919.988864 | 0.370397 | ... | 0.385410 | 0.405532 | 0.428501 | 0.392420 | 0.335756 | 0.423137 | 0.238190 | 1.410457 | 23.588682 | 10.803799 |
| min | 1.000000 | 1.000000 | 0.000000 | 0.001010 | 0.250000 | 0.010000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
| 25% | 10.000000 | 30.000000 | 0.000000 | 45.000000 | 2.500000 | 666.670000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
| 50% | 19.000000 | 59.000000 | 1.000000 | 50.000000 | 5.000000 | 1250.000000 | 25.000000 | 3.000000 | 100.000000 | 1.000000 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 10.000000 | 1.250000 |
| 75% | 27.000000 | 88.000000 | 1.000000 | 80.000000 | 7.500000 | 2857.140000 | 50.000000 | 15.000000 | 500.000000 | 1.000000 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 2.000000 | 25.000000 | 6.000000 |
| max | 35.000000 | 117.000000 | 1.000000 | 30000.000000 | 25.000000 | 120000.000000 | 150.000000 | 75.000000 | 6666.670000 | 1.000000 | ... | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 5.000000 | 100.000000 | 75.000000 |
8 rows × 26 columns
# Check for missing values in the dataset
df.isnull().sum()
episode_number 0 pitch_number 0 brand_name 0 idea 0 deal 0 pitcher_ask_amount 0 ask_equity 0 ask_valuation 0 deal_amount 0 deal_equity 0 deal_valuation 0 ashneer_present 0 anupam_present 0 aman_present 0 namita_present 0 vineeta_present 0 peyush_present 0 ghazal_present 0 ashneer_deal 0 anupam_deal 0 aman_deal 0 namita_deal 0 vineeta_deal 0 peyush_deal 0 ghazal_deal 0 total_sharks_invested 0 amount_per_shark 0 equity_per_shark 0 dtype: int64
# Count the number of companies that received investment and those that didn't
got_in = df[df['deal_amount'] > 0.0].shape
not_in = df[df['deal_amount'] == 0.0].shape
# Print the counts of companies that received and didn't receive investment
print("The number of companies who got the investment: ", got_in[0])
print("The number of companies who didn't got the investment: ", not_in[0])
print("\n---------\n")
# Visualize the distribution of companies that got investment vs. those that didn't using a pie chart
list1=["Got Investment", "Not Received Investment"]
plt.pie([got_in[0], not_in[0]], labels=list1, autopct='%.1f%%')
plt.title('Number of companies which got invextment or not: ')
plt.show()
The number of companies who got the investment: 65 The number of companies who didn't got the investment: 52 ---------
# Filter companies where all sharks invested
df[df["total_sharks_invested"]==5]
| episode_number | pitch_number | brand_name | idea | deal | pitcher_ask_amount | ask_equity | ask_valuation | deal_amount | deal_equity | ... | ashneer_deal | anupam_deal | aman_deal | namita_deal | vineeta_deal | peyush_deal | ghazal_deal | total_sharks_invested | amount_per_shark | equity_per_shark | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 15 | 6 | 16 | Skippi Pops | Ice-Pops | 1 | 45.0 | 5.0 | 900.0 | 100.0 | 15.0 | ... | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 5 | 20.0 | 3.0 |
| 49 | 17 | 50 | Find Your Kicks India | Sneaker Resale | 1 | 50.0 | 10.0 | 500.0 | 50.0 | 25.0 | ... | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 5 | 10.0 | 5.0 |
| 63 | 20 | 64 | IN A CAN | Can Cocktails | 1 | 50.0 | 2.0 | 2500.0 | 100.0 | 10.0 | ... | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 5 | 20.0 | 2.0 |
| 79 | 25 | 80 | Sunfox Technologies | Portable ECG Device | 1 | 100.0 | 2.0 | 5000.0 | 100.0 | 6.0 | ... | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 5 | 20.0 | 1.2 |
4 rows × 28 columns
#Total Shark Deal:
# Visualize the brands involved in five-shark deals and their total investment using a bar chart
total_shark=df[df["total_sharks_invested"]==5]
figure=px.bar(total_shark, x='brand_name', y='deal_amount',title="Five Shark Deal Brands and the total investment:",text_auto=True, color='pitcher_ask_amount',
template="plotly_dark")
figure.show()
#Highest Pitch Ask Amount
# Filter companies with the highest pitch ask amount
high=df[df["pitcher_ask_amount"]>100]
# Visualize the brand with the highest pitch ask amount using a bar chart
figure=px.bar(high, x='brand_name', y='pitcher_ask_amount',title="Highest Pitch Ask Amount:",text_auto=True, color='deal_amount',
template="plotly_dark")
figure.show()
#Ask Equity and Deal Equity of Highest Pitch Ask AMount Brand
# Visualize the ask equity and deal equity of the brand with the highest pitch ask amount
figure=px.bar(high, x='brand_name', y='ask_equity',title="Ask Equity & Deal Equity of Highest Pitch Ask Amount Brand:",text_auto=True, color='deal_equity',
template="plotly_dark")
figure.show()
#Least Pitch Amount Asked
# Filter companies with the lowest pitch amount asked
low=df[df["pitcher_ask_amount"]<20]
# Visualize the brand with the lowest pitch ask amount using a bar chart
figure=px.bar(low, x='brand_name', y='pitcher_ask_amount',title="Lowest Pitch Ask Amount:",text_auto=True, color='deal_amount',
template="plotly_dark")
figure.show()
#No. of brands the sharks have invested:
# Calculate the number of deals each shark has invested in
num_deal_shark=[df.ashneer_deal.sum(), df.anupam_deal.sum(), df.aman_deal.sum(), df.namita_deal.sum(), df.vineeta_deal.sum(), df.peyush_deal.sum(), df.ghazal_deal.sum()]
all_sharks=["Ashneer", "Anupam", "Aman", "Namita", "Vineeta", "Peyush", "Ghazal"]
# Visualize the number of deals done by each individual shark using a bar chart
figure=px.bar(total_shark, x=all_sharks, y=num_deal_shark,title="Number of deals done by individual shark:",color=all_sharks,text_auto=True,
template="plotly_dark")
figure.show()
#Above 50% Equity taken by the shark in which brand?:
# Filter companies where a shark has taken above 50% equity
df_equity=df[df['equity_per_shark']>=50]
# Visualize the brands where a shark has taken above 50% equity using a bar chart
figure=px.bar(df_equity, x='brand_name', y='equity_per_shark',title="Above 50% Equity taken by the shark in which brand:",text_auto=True, color='deal_amount',
template="plotly_dark")
figure.show()
# How much equity is offered by entrepreneurs to the investors in the deals (Avg)
# Calculate the average equity offered by entrepreneurs to investors in deals
average_equity = df['deal_equity'].mean()
print(f"The average equity offered by entrepreneurs to investors on Shark Tank India is: {average_equity:.2f}")
The average equity offered by entrepreneurs to investors on Shark Tank India is: 8.96
# Average amount invested in the deals made
average_investment = df['deal_amount'].mean()
print(f"The average amount invested in the deals made on Shark Tank India is: {average_investment}")
The average amount invested in the deals made on Shark Tank India is: 31.982915042735044
# Correlation between the pitchers asking valuation and the actual deal valuation in the deals
# Visualize the correlation between pitchers' asking valuation and actual deal valuation
figure = px.scatter(df, x='ask_valuation', y='deal_valuation',
labels={'ask_valuation': "Pitchers' Asking Valuation",
'deal_valuation': "Actual Deal Valuation"},
title="Correlation between Pitchers' Asking Valuation and Actual Deal Valuation",
color='deal_amount',
color_continuous_scale='Viridis',
hover_name='brand_name'
)
figure.update_layout(template='plotly_dark')
figure.show()
# Success Rate of Deals Made by Shark
# Calculate and visualize the success rate of deals made by each shark
total_deals_by_shark = df[['ashneer_deal', 'anupam_deal', 'aman_deal', 'namita_deal', 'vineeta_deal', 'peyush_deal', 'ghazal_deal']].sum()
successful_deals_by_shark = df[df['deal'] == 1][['ashneer_deal', 'anupam_deal', 'aman_deal', 'namita_deal', 'vineeta_deal', 'peyush_deal', 'ghazal_deal']].sum()
success_rate_by_shark = (successful_deals_by_shark / total_deals_by_shark) * 100
bar_colors = ['rgb(65,105,225)', 'rgb(144,238,144)', 'rgb(218,165,32)', 'rgb(199,21,133)', 'rgb(255,140,0)', 'rgb(75,0,130)', 'rgb(255,0,0)']
figure = go.Figure(data=go.Bar(
x=success_rate_by_shark.index,
y=success_rate_by_shark,
marker=dict(color=bar_colors),
hovertemplate='Success Rate: %{y:.2f}%<br><extra></extra>'
))
figure.update_layout(
title="Success Rate of Deals Made by Shark",
xaxis_title="Shark",
yaxis_title="Success Rate (%)",
template='plotly_dark'
)
figure.show()
# Visualize the relationship between investment amount, equity offered, and deal valuation
figure = go.Figure(data=[go.Scatter3d(
x=df['pitcher_ask_amount'],
y=df['ask_equity'],
z=df['deal_amount'],
mode='markers',
marker=dict(
size=8,
color=df['deal_valuation'],
colorscale='Blues',
colorbar=dict(title='Deal Valuation'),
showscale=True
),
text=df['brand_name'],
hovertemplate='Brand: %{text}<br>Investment Amount: %{x}<br>Equity Offered: %{y}<br>Deal Valuation: %{z}<extra></extra>'
)])
figure.update_layout(
title="Investment Amount, Equity Offered, and Deal Valuation on Shark Tank India",
scene=dict(
xaxis_title="Investment Amount",
yaxis_title="Equity Offered",
zaxis_title="Deal Amount"
),
template='plotly_dark'
)
figure.show()
# Visualize the relationship between pitch valuation and equity offered by entrepreneurs
figure = px.scatter(df, x='ask_valuation', y='ask_equity',
labels={'ask_valuation': "Pitch Valuation",
'ask_equity': "Equity Offered"},
title="Relationship between Pitch Valuation and Equity Offered on Shark Tank India",
trendline="ols",
hover_name='brand_name')
figure.update_layout(template='plotly_dark')
figure.show()
# Visualize the relationship between pitch valuation, equity offered, and deal amount
figure = go.Figure(data=[go.Scatter3d(
x=df['ask_valuation'],
y=df['ask_equity'],
z=df['deal_amount'],
mode='markers',
marker=dict(
size=8,
color=df['deal_amount'],
colorscale='Viridis',
opacity=0.8
),
hovertemplate='<b>Brand:</b> %{text}<br>'
'<b>Pitch Valuation:</b> %{x}<br>'
'<b>Equity Offered:</b> %{y}<br>'
'<b>Deal Amount:</b> %{z}<br><extra></extra>',
text=df['brand_name']
)])
figure.update_layout(
title="Relationship between Pitch Valuation, Equity Offered, and Deal Amount",
scene=dict(
xaxis_title="Pitch Valuation",
yaxis_title="Equity Offered",
zaxis_title="Deal Amount"
),
template='plotly_dark'
)
figure.show()
# Comparision of Successful Pitches and Unsuccessful Pitches
successful_pitches = df[df['deal'] == 1]
unsuccessful_pitches = df[df['deal'] == 0]
successful_mean_valuation = successful_pitches['ask_valuation'].mean()
unsuccessful_mean_valuation = unsuccessful_pitches['ask_valuation'].mean()
figure = px.bar(x=['Successful Pitches', 'Unsuccessful Pitches'],
y=[successful_mean_valuation, unsuccessful_mean_valuation],
color=['Successful Pitches', 'Unsuccessful Pitches'],
color_discrete_sequence=['rgb(65,105,225)', 'rgb(144,238,144)'],
labels={'x': '', 'y': 'Average Valuation'},
template='plotly_dark')
figure.update_layout(title='Average Valuation of Successful vs Unsuccessful Pitches')
figure.show()